package com.baizw.cultivation.module.admin.entity;

import com.baizw.cultivation.module.admin.entity.vo.Permission;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.util.List;

/**
 * 角色实体
 *
 * @author 剧终1204
 * @version V1.0
 * @date 2020年04月27日 14:23:04
 */
@Data
@ApiModel("角色实体")
@TableName("t_role")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
public class RoleEntity extends BaseEntity {

    @ApiModelProperty("角色名称")
    private String name;

    @TableField(value = "`describe`")
    @ApiModelProperty("角色描述")
    private String describe;

    @TableField(exist = false)
    @ApiModelProperty("关联的资源ID")
    private List<Long> resources;

    @TableField(exist = false)
    private List<Permission> permissions;
}
